{% extends "base.html" %}
{% load static %}
{% load crispy_forms_tags %}

{% block title %}
Admin Dashboard | {{ block.super }}
{% endblock title %}

{% block stylesheets %}
    {{ block.super }}
    <!-- Custom styles for this template -->
    <link href="{% static "css/laioffer/vendor/bootstrap-switch.min.css" %}" rel="stylesheet">
{% endblock stylesheets %}

{% block content %}
{% include "_admin_sidebar.html" %}

<section id="main-content">
    <section class="wrapper">


        <section class="panel">
            <div class="panel-heading">
                {{ view.section_title }}
            </div>
            <div class="panel-body">
                <form method="post" class="form-horizontal">
                    {% csrf_token %}
                    {% crispy form view.form_helper %}
                    <div class="form-group">
                        <div class="col-lg-2"></div>
                        <div class="col-lg-6">
                            <button class="btn btn-success " type="submit">{{ view.submit_text }}</button>
                            <a href="javascript:history.back()" class="btn btn-default">Cancel</a>
                        </div>
                    </div>
                </form>
            </div>

        </section>

    </section>
</section>

{% endblock content %}

{% block javascripts %}
    {{ block.super }}
    <script type="text/javascript" src="{% static "js/laioffer/vendor/bootstrap-switch.min.js" %}"></script>
    <script type="text/javascript">
        $("[name='visible']").bootstrapSwitch();
    </script>
{% endblock javascripts %}
